typedef struct tnode *ptnode;
struct tnode {		
  long key;		
  ptnode left;
  ptnode right;
  ptnode p;
  char color;			/* color = 'R' or 'B' */
  long size;			/* size of subtree rooted at this node */
};
extern ptnode nil;
ptnode newtree();
ptnode newtnode(long v);
ptnode treeroot(ptnode);
void newtreeroot(ptnode, ptnode);
ptnode tree_successor(ptnode);
void tree_insert(ptnode, ptnode);
ptnode tree_search(ptnode, long);
ptnode tree_delete(ptnode, ptnode);


